home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip: 2005 Utilities
/
CHIP Utilities 2005.7z
/
CHIP Utilities 2005.iso
/
images
/
arachne.igz
/
arachne.img
/
AUTOEXEC.BAT
next >
Wrap
DOS Batch File
|
2005-01-16
|
6KB
|
178 lines
@set debug=
@if "%debug%"=="" if not exist \debug.txt echo off
if "%1"==":" if not "%2"=="" goto %2
set ramdrv=
set path=\bin;\
if "%os%"=="" set os=ms
::**** User Configurable Items ****
::Set Ramdrive Letter (use lowercase !)
set ramltr=q:
::Set Ramdrive size (KB), put 0 to disable Ramdrive
set ramsz=8192
::Set ScrollBackBuffer size (KB), put 0 to disable
set persz=512
::Set TimeZone (very optional)
set tz=GMT+1
::Uncomment to set Cache (KB), default 6144
@rem set cachesz=4096
::Uncomment to set Cdrom Cache on FreeDOS (KB), default 1024, put 0 to disable
@rem set cachecd=2048
::Uncomment to disable Diskette caching on FreeDOS
@rem set tickle=0
::Uncomment for Verbose Extracting
@rem set xtrct=verbose
::**** User Configurable Items ****
if exist $MMXXXX0 set ldh=loadhigh
if exist EMMXXXX0 set ldh=loadhigh
if exist EMMQXXX0 set ldh=loadhigh
if exist UMBPCIXX set ldh=loadhigh
if exist \bin\fix27.com %ldh% \bin\fix27.com
if not exist \bin\peruse.com if not exist %ramdrv%\bin\peruse.com goto _perq1
if not exist XMSXXXX0 if not exist EMMQXXX0 goto _perq1
if "%persz%"=="0" goto _perq1
%ldh% peruse.com /x%persz% >nul
:_perq1
set persz=
:_about
if "%1"==":" if not "%2"=="" cls
@echo.
set prompt=$p$g
echo MODBOOT v2.6, Copyright (C) by Bart Lagerweij
echo Bart's Modular Boot Disk - http://www.nu2.nu/bootdisk/modboot/
echo This program is free software, but WITHOUT ANY WARRANTY!
echo An official license is being made for this software...
echo See http://www.nu2.nu/license/ for more details.
@echo.
echo NwDsk 3.22 Copyright (C) 2002-2005 Erwin Veermans
echo mailto:NwDsk@Veder.com
echo http://www.veder.com/nwdsk/
echo NetWare Dos Client 16/32-bit (VLM/NLM) IPX + IP
ver /r
if "%1"==":" if not "%2"=="" if exist %ramdrv%\bin\diskid.txt type %ramdrv%\bin\diskid.txt
if "%1"==":" if not "%2"=="" goto _endab
echo.
set srcdrv=
if not exist %ramdrv%\bin\bootdrv.com goto _nobdrv
%ramdrv%\bin\bootdrv.com
if "%os%"=="dr" goto _nobenny
for %%i in (Z Y X W V U T S R Q P O N M L K J I H G F E D C B A) do if not errorlevel H%%i set srcdrv=%%i:
goto _nobdrv
:_nobenny
if errorlevel 0 set srcdrv=a:
if errorlevel 1 set srcdrv=b:
if errorlevel 2 set srcdrv=c:
if errorlevel 3 set srcdrv=d:
if errorlevel 4 set srcdrv=e:
if errorlevel 5 set srcdrv=f:
if errorlevel 6 set srcdrv=g:
if errorlevel 7 set srcdrv=h:
if errorlevel 8 set srcdrv=i:
if errorlevel 9 set srcdrv=j:
:_nobdrv
if "%srcdrv%"=="" set srcdrv=a:
echo AUTOEXEC: Booted drive is %srcdrv%
:_goram
if exist %srcdrv%\diskid.txt type diskid.txt
path=%srcdrv%\bin;%srcdrv%\
if "%config%"=="CLEAN" goto _end
if "%config%"=="0" goto _end
if exist EMMQXXX0 goto _xmsok
if exist XMSXXXX0 goto _xmsok
echo.
echo AUTOEXEC: No XMS manager installed (himem.sys)
goto _abort
:_xmsok
:_ramsrc
if "%ramsz%"=="0" set ramdrv=%srcdrv%
if not "%ramdrv%"=="" goto _ramok
set ramdrv=%ramltr%
if "%ramdrv%"=="" set ramdrv=q:
for %%i in (unzip.exe lha.exe extract.exe) do if exist %srcdrv%\bin\%%i goto _extracok
echo.
echo AUTOEXEC: Missing file "%srcdrv%\bin\extract.exe"
goto _abort
:_extracok
for %%i in (unzip.exe lha.exe extract.exe) do if exist %ramdrv%\bin\%%i goto _ramok
echo AUTOEXEC: Setting up Ramdisk at drive %ramdrv%
xmsdsk %ramsz% %ramdrv% /y /t
if errorlevel 1 goto _ramok
goto _abort
:_ramok
if not exist %ramdrv%\etc\nul mkdir %ramdrv%\etc
if not exist %ramdrv%\etc\profile\nul mkdir %ramdrv%\etc\profile
set ramltr=
if not exist %ramdrv%\bin\nul md %ramdrv%\bin
if not exist %ramdrv%\tmp\nul md %ramdrv%\tmp
set temp=%ramdrv%\tmp
set tmp=%ramdrv%\tmp
copy %srcdrv%\command.com %ramdrv%\bin >nul
if not exist %ramdrv%\bin\command.com goto _abort
set comspec=%ramdrv%\bin\command.com
:_dumlab1
for %%i in (unzip.exe lha.exe extract.exe) do if exist %ramdrv%\bin\%%i goto _skipcp
echo AUTOEXEC: Copying %srcdrv%\bin and %srcdrv%\etc to %ramdrv%
if exist %srcdrv%\bin\*.* copy %srcdrv%\bin\*.* %ramdrv%\bin\. >nul
if exist %srcdrv%\etc\*.* copy %srcdrv%\etc\*.* %ramdrv%\etc\. >nul
if exist %srcdrv%\etc\profile\*.* copy %srcdrv%\etc\profile\*.* %ramdrv%\etc\profile\. >nul
if not exist %ramdrv%\bin\extract.exe if not exist %ramdrv%\bin\unzip.exe if not exist %ramdrv%\bin\lha.exe goto _abort
:_skipcp
set path=%ramdrv%\bin;%ramdrv%\
:_dumlab5
if exist %srcdrv%\diskid.txt copy %srcdrv%\diskid.txt %ramdrv%\bin\. >nul
if exist %srcdrv%\config.sys copy %srcdrv%\config.sys %ramdrv%\bin\. >nul
if exist %ramdrv%\bin\lha.exe set arcext=lzh
if exist %ramdrv%\bin\unzip.exe set arcext=zip
if exist %ramdrv%\bin\extract.exe set arcext=cab
if not "%arcext%"=="zip" if not "%arcext%"=="cab" if not "%arcext%"=="lzh" goto _abort
if not exist %ramdrv%\bin\share.* goto _nshare
%ldh% %ramdrv%\bin\share >nul
if errorlevel 2 if not errorlevel 3 %ramdrv%\bin\share >nul
:_nshare
if exist %ramdrv%\bin\modboot.bat goto _modboot
if not exist %srcdrv%\bin\modboot.%arcext% goto _nmodlzh
if not "%arcext%"=="zip" goto _nmodzip
unzip.exe -o -qq %srcdrv%\bin\modboot.%arcext% -d %ramdrv%\
if errorlevel 1 goto _unpackerr
:_nmodzip
if exist %ramdrv%\bin\modboot.bat goto _modboot
if not "%arcext%"=="lzh" goto _nmodlzh
lha.exe x -m1 -n2 %srcdrv%\bin\modboot.%arcext% %ramdrv%\
if errorlevel 1 goto _unpackerr
:_nmodlzh
if exist %ramdrv%\bin\modboot.bat goto _modboot
if exist %srcdrv%\bin\modboot.%arcext% goto _modbcabok
echo.
echo AUTOEXEC: Missing file "%srcdrv%\bin\modboot.%arcext%"
goto _abort
:_modbcabok
extract /y /l %ramdrv%\ /e %srcdrv%\bin\modboot.%arcext% >%tmp%\extract.out
if errorlevel 1 goto _unpackerr
if exist %tmp%\extract.out del %tmp%\extract.out
if exist %ramdrv%\bin\modboot.bat goto _modboot
echo.
echo AUTOEXEC: Missing file "%ramdrv%\bin\modboot.bat"
goto _abort
:_unpackerr
if exist %tmp%\extract.out type %tmp%\extract.out
if exist %tmp%\extract.out del %tmp%\extract.out
echo.
echo AUTOEXEC: Error while unpacking "%srcdrv%\bin\modboot.%arcext%"
goto _abort
:_modboot
if not exist ifs$hlp$ if exist %ramdrv%\bin\ifshlp.sys call devhigh %ramdrv%\bin\ifshlp.sys
%ramdrv%
cd \
%ramdrv%\bin\modboot.bat
:_abort
:_error
shift
shift
if not ""=="%1" echo AUTOEXEC: %1 %2 %3 %4 %5 %6 %7 %8
echo AUTOEXEC: Aborted...
:_endab
echo.
pause
:_end